Clover coverage report - Enterprise Web Services - 1.0
Coverage timestamp: Mon May 30 2005 17:10:32 CEST
file stats: LOC: 55   Methods: 1
NCLOC: 27   Classes: 1
30 day Evaluation Version distributed via the Maven Jar Repository. Clover is not free. You have 30 days to evaluate it. Please visit http://www.thecortex.net/clover to obtain a licensed version of Clover
 
 Source file Conditionals Statements Methods TOTAL
WSCFWebservicesImpl.java 66.7% 75% 100% 73.7%
coverage coverage
 1   
 /*
 2   
  * Copyright 2001-2004 The Apache Software Foundation.
 3   
  * 
 4   
  * Licensed under the Apache License, Version 2.0 (the "License");
 5   
  * you may not use this file except in compliance with the License.
 6   
  * You may obtain a copy of the License at
 7   
  * 
 8   
  *      http://www.apache.org/licenses/LICENSE-2.0
 9   
  * 
 10   
  * Unless required by applicable law or agreed to in writing, software
 11   
  * distributed under the License is distributed on an "AS IS" BASIS,
 12   
  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 13   
  * See the License for the specific language governing permissions and
 14   
  * limitations under the License.
 15   
  */
 16   
 package org.apache.geronimo.ews.ws4j2ee.context.webservices.server.xmlbeans;
 17   
 
 18   
 import com.sun.java.xml.ns.j2Ee.IconType;
 19   
 import com.sun.java.xml.ns.j2Ee.WebserviceDescriptionType;
 20   
 import com.sun.java.xml.ns.j2Ee.WebservicesType;
 21   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.AbstractWSCFWebservices;
 22   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.WSCFException;
 23   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebserviceDescription;
 24   
 import org.apache.geronimo.ews.ws4j2ee.context.webservices.server.interfaces.WSCFWebservices;
 25   
 
 26   
 /**
 27   
  * This is the class that will represent the webservices element in the runtime.
 28   
  * This is the root element of the webservices.xml file. The parsing of elements will be initiated from here and will be
 29   
  * parsed in a depth first manner
 30   
  */
 31   
 public class WSCFWebservicesImpl extends AbstractWSCFWebservices implements WSCFWebservices {
 32   
     /**
 33   
      * Constructor
 34   
      * This is the constructor that was written to make the code jaxb complient. THis class
 35   
      * basically wrap the jaxb webservides element.
 36   
      */
 37  13
     public WSCFWebservicesImpl(WebservicesType webservices) throws WSCFException {
 38  13
         this.description = XMLBeansUtils.getStringValue(webservices.getDescriptionArray());
 39  13
         this.displayName = XMLBeansUtils.getStringValue(webservices.getDisplayNameArray());
 40  13
         IconType[] icons = webservices.getIconArray();
 41  13
         if (icons.length > 0) {
 42  0
             this.smallIcon = XMLBeansUtils.getStringValue(icons[0].getSmallIcon());
 43  0
             this.largeIcon = XMLBeansUtils.getStringValue(icons[0].getLargeIcon());
 44   
         }
 45  13
         WebserviceDescriptionType[] wsdes = webservices.getWebserviceDescriptionArray();
 46  13
         if (0 == wsdes.length) {
 47  0
             throw new WSCFException("The webservices description element does not exist");
 48   
         }
 49  13
         for (int i = 0; i < wsdes.length; i++) {
 50  13
             WSCFWebserviceDescription webservicesDescription = new WSCFWebserviceDescriptionImpl(wsdes[i]);
 51  13
             this.webServiceDescriptions.put(webservicesDescription.getDisplayName(), webservicesDescription);
 52   
         }
 53   
     }
 54   
 }
 55